3.2450 \(\int \frac{a+b x^n}{x^3} \, dx\)

Optimal. Leaf size=24 \[ -\frac{a}{2 x^2}-\frac{b x^{n-2}}{2-n} \]

[Out]

-a/(2*x^2) - (b*x^(-2 + n))/(2 - n)

_______________________________________________________________________________________

Rubi [A]  time = 0.0282935, antiderivative size = 24, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 11, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.091 \[ -\frac{a}{2 x^2}-\frac{b x^{n-2}}{2-n} \]

Antiderivative was successfully verified.

[In]  Int[(a + b*x^n)/x^3,x]

[Out]

-a/(2*x^2) - (b*x^(-2 + n))/(2 - n)

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 3.71605, size = 17, normalized size = 0.71 \[ - \frac{a}{2 x^{2}} - \frac{b x^{n - 2}}{- n + 2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((a+b*x**n)/x**3,x)

[Out]

-a/(2*x**2) - b*x**(n - 2)/(-n + 2)

_______________________________________________________________________________________

Mathematica [A]  time = 0.0199218, size = 21, normalized size = 0.88 \[ \frac{b x^{n-2}}{n-2}-\frac{a}{2 x^2} \]

Antiderivative was successfully verified.

[In]  Integrate[(a + b*x^n)/x^3,x]

[Out]

-a/(2*x^2) + (b*x^(-2 + n))/(-2 + n)

_______________________________________________________________________________________

Maple [A]  time = 0.014, size = 21, normalized size = 0.9 \[{\frac{1}{{x}^{2}} \left ({\frac{b{{\rm e}^{n\ln \left ( x \right ) }}}{-2+n}}-{\frac{a}{2}} \right ) } \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((a+b*x^n)/x^3,x)

[Out]

(b/(-2+n)*exp(n*ln(x))-1/2*a)/x^2

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x^n + a)/x^3,x, algorithm="maxima")

[Out]

Exception raised: ValueError

_______________________________________________________________________________________

Fricas [A]  time = 0.237072, size = 31, normalized size = 1.29 \[ -\frac{a n - 2 \, b x^{n} - 2 \, a}{2 \,{\left (n - 2\right )} x^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x^n + a)/x^3,x, algorithm="fricas")

[Out]

-1/2*(a*n - 2*b*x^n - 2*a)/((n - 2)*x^2)

_______________________________________________________________________________________

Sympy [A]  time = 1.99042, size = 60, normalized size = 2.5 \[ \begin{cases} - \frac{a n}{2 n x^{2} - 4 x^{2}} + \frac{2 a}{2 n x^{2} - 4 x^{2}} + \frac{2 b x^{n}}{2 n x^{2} - 4 x^{2}} & \text{for}\: n \neq 2 \\- \frac{a}{2 x^{2}} + b \log{\left (x \right )} & \text{otherwise} \end{cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((a+b*x**n)/x**3,x)

[Out]

Piecewise((-a*n/(2*n*x**2 - 4*x**2) + 2*a/(2*n*x**2 - 4*x**2) + 2*b*x**n/(2*n*x*
*2 - 4*x**2), Ne(n, 2)), (-a/(2*x**2) + b*log(x), True))

_______________________________________________________________________________________

GIAC/XCAS [F]  time = 0., size = 0, normalized size = 0. \[ \int \frac{b x^{n} + a}{x^{3}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x^n + a)/x^3,x, algorithm="giac")

[Out]

integrate((b*x^n + a)/x^3, x)